$(document).ready(function() {
	$(document).on('click','.addCommunity',function(){
		console.log("addCommunity" + $(this).attr('data-toggle'));
		$("#modalAddCommunity").modal("show");
		$("#groupColor").hide();
		$("#relatedCom").val($(this).attr('data-toggle'));
	});

	$(document).on('click','.removeCommunity',function(){
		console.log("removeCommunity" + $(this).attr('data-toggle'));
	});

	$(document).on('click','.modifyCommunity',function(){
		console.log("modifyCommunity" + $(this).attr('data-toggle'));
	});
	
	$(document).on('click','#addUniverse',function(){
		$("#modalAddCommunity").modal("show");
		$("#groupColor").show();
		$('#color').ColorPicker({
			onSubmit: function(hsb, hex, rgb, el) {
				$(el).val(hex);
				$(el).ColorPickerHide();
			},
			onBeforeShow: function () {
				$(this).ColorPickerSetColor(this.value);
			},
			onShow: function(colpkr) {
				$(colpkr).css("z-index",2000);
			}
		});
		$("#relatedCom").val('-1');
	});
});